package ProjetCorba;

/**
 * Interface definition : Station
 * 
 * @author OpenORB Compiler
 */
public abstract class StationPOA extends org.omg.PortableServer.Servant
        implements StationOperations, org.omg.CORBA.portable.InvokeHandler
{
    public Station _this()
    {
        return StationHelper.narrow(_this_object());
    }

    public Station _this(org.omg.CORBA.ORB orb)
    {
        return StationHelper.narrow(_this_object(orb));
    }

    private static String [] _ids_list =
    {
        "IDL:ProjetCorba/Station:1.0"
    };

    public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte [] objectId)
    {
        return _ids_list;
    }

    public final org.omg.CORBA.portable.OutputStream _invoke(final String opName,
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler)
    {

        if (opName.equals("deposerColis")) {
                return _invoke_deposerColis(_is, handler);
        } else if (opName.equals("genererCode")) {
                return _invoke_genererCode(_is, handler);
        } else if (opName.equals("getCasierLibre")) {
                return _invoke_getCasierLibre(_is, handler);
        } else if (opName.equals("notificationColis")) {
                return _invoke_notificationColis(_is, handler);
        } else if (opName.equals("retirerColis")) {
                return _invoke_retirerColis(_is, handler);
        } else if (opName.equals("setStation")) {
                return _invoke_setStation(_is, handler);
        } else {
            throw new org.omg.CORBA.BAD_OPERATION(opName);
        }
    }

    // helper methods
    private org.omg.CORBA.portable.OutputStream _invoke_getCasierLibre(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;

        short _arg_result = getCasierLibre();

        _output = handler.createReply();
        _output.write_short(_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_genererCode(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        short arg0_in = _is.read_short();

        String _arg_result = genererCode(arg0_in);

        _output = handler.createReply();
        _output.write_string(_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_notificationColis(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        short arg0_in = _is.read_short();

        notificationColis(arg0_in);

        _output = handler.createReply();

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_setStation(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;

        setStation();

        _output = handler.createReply();

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_deposerColis(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        short arg0_in = _is.read_short();

        deposerColis(arg0_in);

        _output = handler.createReply();

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_retirerColis(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        short arg0_in = _is.read_short();

        retirerColis(arg0_in);

        _output = handler.createReply();

        return _output;
    }

}
